import { App } from "vue";
import { registerEditorProvider } from "@ibiz-template/runtime";
import { TextBoxEditorProvider } from "./i-biz-text-box-editor.provider";
import Input from './input/i-biz-input.vue'
import InputNumber from './input-number/i-biz-input-number.vue'

export const IBizTextBox = {
  install(v: App) {
    v.component('IBizInput', Input);
    v.component('IBizInputNumber', InputNumber);
    // 文本框
    registerEditorProvider('MOBTEXT', () => new TextBoxEditorProvider());
    
    registerEditorProvider('MOBPASSWORD', () => new TextBoxEditorProvider());
    registerEditorProvider('MOBTEXTAREA', () => new TextBoxEditorProvider('TEXTAREA'));
    registerEditorProvider(
      'MOBNUMBER',
      () => new TextBoxEditorProvider('NUMBER'),
    );
  },
};
